
<%@page contentType="text/html" pageEncoding="UTF-8"%>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script >
            function validate(){
                var nm = document.form.username.value;
                var pw = document.form.password.value;
                if(nm==""){
                    alert("Enter Name")
                    document.form.username.focus();
                    return false;
                }
                if(pw==""){
                    alert("Enter Password")
                    document.form.password.focus();
                    return false;
                }
                return true;
            }
        </script>

    </head>
    <body>
        <h3 align="center"><font color="">Form Login Customer</font></h3>
        <form method="post" action="Action" name="form" onsubmit="javascript:return validate()">
            <table align="center" border="0" style="background-color: lightcyan">
                <tr>
                    <td>UserName:
                        <input type="text" name="username">
                    </td>
                </tr>
                <tr>
                    <td>Password:  
                        <input type="password" name="password">
                    </td>
                </tr>
                <tr>
                    <td>
                        <input type="submit" name="submit" value="Login">
                        <input type="reset" name="reset" value="Reset">
                    </td>
                </tr>
            </table>
        </form>
    </body>
</html>
